package com.rc.pojo.po;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.handler.JacksonTypeHandler;
import com.rc.common.model.BaseImgEntity;
import com.rc.common.model.ImageModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 农场表 实体类。
 *
 * @author 27806
 * @since 2024-06-15
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "farm", schema = "rc")
public class Farm implements BaseImgEntity,Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 农场id
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 农场名称
     */
    private String name;

    /**
     * 地址
     */
    private String address;

    /**
     * 简介
     */
    private String description;

    /**
     * 轮播图
     */
    @Column(typeHandler = JacksonTypeHandler.class)
    private List<ImageModel> imgs;

    /**
     * 适宜月份
     */
    private String suitableMonth;

    /**
     * 主要植物
     */
    private String mainPlant;

    /**
     * 主要人群
     */
    private String mainPopulation;

    /**
     * 主要活动
     */
    private String mainActivity;

    private Double lng;

    private Double lat;

    @Column(onInsertValue = "0")
    private Double score;

    @Column(onInsertValue = "0")
    private Integer recommended;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

}
